#include "list.h"

void ShowLS(List* phead)
{
    List* cur = phead->next;
    while(cur != phead)
    {
        cout << cur->data << ' ';
        cur = cur->next;
    }
}


int main()
{
    List* phead = ListInit();

    ListPushBack(phead, 1);
    ListPushBack(phead, 2);
    ListPushBack(phead, 0);
    ListPushBack(phead, 4);

    ListInsert(FindNode(phead, 4), 3);

    ListPopBack(phead);

    ListErase(FindNode(phead, 0));

    ShowLS(phead);

    DeleteList(phead);

    return 0;
}